using ERP.RepositoryManage.Dtos;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace ERP.RepositoryManage
{
    /// <summary>
    /// 装箱管理服务接口
    /// </summary>
    public interface IPackingService : IApplicationService
    {
        /// <summary>
        /// 获取装箱管理列表（树形）
        /// </summary>
        Task<List<PackingDto>> GetTreeListAsync(GetPackingInputDto input);

        /// <summary>
        /// 获取装箱管理分页列表
        /// </summary>
        Task<PagedResultDto<PackingDto>> GetListAsync(GetPackingInputDto input);

        /// <summary>
        /// 获取装箱管理详情
        /// </summary>
        Task<PackingDto> GetAsync(int id);

        /// <summary>
        /// 创建装箱管理
        /// </summary>
        Task<PackingDto> CreateAsync(CreatePackingDto input);

        /// <summary>
        /// 更新装箱管理
        /// </summary>
        Task<PackingDto> UpdateAsync(int id, UpdatePackingDto input);

        /// <summary>
        /// 删除装箱管理
        /// </summary>
        Task DeleteAsync(int id);

        /// <summary>
        /// 生成装箱单编号
        /// </summary>
        Task<string> GeneratePackingCodeAsync();

        /// <summary>
        /// 添加子箱
        /// </summary>
        Task<PackingDto> AddSubPackingAsync(int parentId, int subPackingId);

        /// <summary>
        /// 获取可选择的装箱列表（父级ID为0的装箱）
        /// </summary>
        Task<PagedResultDto<PackingDto>> GetParentPackingSelectListAsync(GetPackingInputDto input);

        /// <summary>
        /// 获取装箱明细列表
        /// </summary>
        Task<List<PackingDetailDto>> GetPackingDetailsAsync(int packingId);

        /// <summary>
        /// 添加装箱明细
        /// </summary>
        Task<PackingDetailDto> CreatePackingDetailAsync(CreatePackingDetailDto input);

        /// <summary>
        /// 删除装箱明细
        /// </summary>
        Task DeletePackingDetailAsync(int detailId);

        /// <summary>
        /// 获取装箱明细详情
        /// </summary>
        Task<PackingDetailDto> GetPackingDetailAsync(int id);

        /// <summary>
        /// 更新装箱明细
        /// </summary>
        Task<PackingDetailDto> UpdatePackingDetailAsync(int id, UpdatePackingDetailDto input);

        /// <summary>
        /// 移除子箱
        /// </summary>
        Task RemoveSubPackingAsync(int subPackingId);

        /// <summary>
        /// 获取生产工单选择列表
        /// </summary>
        Task<PagedResultDto<WorkOrderSelectDto>> GetWorkOrderSelectListAsync(GetWorkOrderSelectInputDto input);

        /// <summary>
        /// 获取客户选择列表
        /// </summary>
        Task<PagedResultDto<CustomerSelectDto>> GetCustomerSelectListAsync(GetCustomerSelectInputDto input);

        /// <summary>
        /// 完成装箱（更新状态为已完成）
        /// </summary>
        Task CompletePacking(int id);
    }
} 